<?php 
namespace Admin\Model;
use Think\Model\RelationModel;

class CompanyModel extends RelationModel
{
	protected $_link=array(
        'questionnaires'=>array(
            'mapping_type'=>self::HAS_MANY,//HAS_ONE查询出一条
            'class_name'=>'questionnaires',
            'mapping_name'=>'ques',
            'foreign_key'=>'type',
        ),   
        );
}